package meconsea.life.cms.web.tags;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;

public class ArtHeaderTag extends ComponentTagSupport {
	private static final long serialVersionUID = -5373328231966321759L;
	
	//业务数据
	//文章类型 0:全部 y:衣 s:食 z:住 x:行
	private String artType;
	//文章分类 不包含子类
	private String artCls;
	public String getArtType() {
		return artType;
	}
	public void setArtType(String artType) {
		this.artType = artType;
	}
	public String getArtCls() {
		return artCls;
	}
	public void setArtCls(String artCls) {
		this.artCls = artCls;
	}
	
	@Override
	public Component getBean(ValueStack arg0, HttpServletRequest arg1,
			HttpServletResponse arg2) {
		return new ArtHeader(arg0,arg1,arg2,this.pageContext);
	}
	protected void populateParams() {
		super.populateParams();
		ArtHeader ah = (ArtHeader)component;
		ah.setArtCls(artCls);
		ah.setArtType(artType);
	}
}
